import request from '@/utils/request'
// 获取月卡列表
export function getMonthCards(params) {
  return request({
    url: 'parking/card/list',
    params
  })
}
// 查看月卡详情
export function findMonthCard(id) {
  return request({
    url: `parking/card/${id}`
  })
}
// 添加月卡
export function addMonthCard(data) {
  return request({
    url: 'parking/card',
    method: 'POST',
    data
  })
}
// 续费月卡
export function RenewalCard(data) {
  return request({
    url: 'parking/card/recharge',
    method: 'POST',
    data
  })
}
// 编辑月卡详情
export function getEditCard(id) {
  return request({
    url: `parking/card/detail/${id}`
  })
}
// 编辑月卡
export function editMonthCard(data) {
  return request({
    url: 'parking/card/edit',
    method: 'PUT',
    data
  })
}
// 删除月卡列表
export function delMonthCard(id) {
  return request({
    url: `parking/card/${id}`,
    method: 'DELETE'
  })
}
